fc-icon
Icon element with global icon cache.
Example
Create blue icon and red on hover.
.custom-icon {
--fc-icon-fill: blue;
--fc-icon-fill-hover: red;
}
<fc-icon hoverable class="custom-icon"></fc-icon>
Properties
Property | Attribute | Type | Default | Description |
---|
cache | | Map<any, any> | | Reference to the icon cache. This globally shared reference stores icons for all instance. |
fallbackIcon | fallback-icon | string | "FC_ICON_DEFAULT" | The fallback icon key for the instance |
hoverable | hoverable | boolean | false | Whether the icon will change colour when hovered. |
icon | icon | string | "" | The icon key. Used to lookup icon in the cache. Falls back to 'forter' whenever an icon is not found. |
originalFill | original-fill | boolean | false | Whether to use the icon's original 'fill' SVG property. Needed for multicolor icons or for certain types of SVG. |
size | size | string | | |
CSS Custom Properties
Property | Description |
---|
--fc-icon-fill | icon's svg fill. default: currentColor |
--fc-icon-fill-hover | icon's svg fill on hover. default: var(--cyan-5) |
--fc-icon-size | icon's size. default: 20px |